-- private variables
local background

-- public functions
function init()
  background = g_ui.displayUI('background')
  background:lower()

  connect(g_game, { onGameStart = hide })
  connect(g_game, { onGameEnd = show })
end

function terminate()
  disconnect(g_game, { onGameStart = hide })
  disconnect(g_game, { onGameEnd = show })
  background:destroy()

  Background = nil
end

function hide()
  background:hide()
end

function show()
  background:show()
end


function getBackground()
  return background
end